import turtle as t
import random

count = random.randint(1, 10)
pos_lst = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0],
           [0, 0], [0, 0], [0, 0], [0, 0]]
for i in range(count):
    x = random.randint(-515, 515)
    y = random.randint(-335, 335)
    pos_lst[i][0] = x
    pos_lst[i][1] = y


def draw(pos_x, pos_y):
    t.penup()
    t.goto(pos_x, pos_y)
    t.pendown()
    t.dot(30)
    t.update()


def animate():
    t.clear()
    for j in range(count):
        if pos_lst[j][0] <= 515 and pos_lst[j][0] > -520:
            pos_lst[j][0] -= 5
        draw(pos_lst[j][0], pos_lst[j][1])
    t.ontimer(animate, 25)


t.setup(1080, 720)
t.ht()
t.tracer(False)
animate()

t.done()
